package com.yzd.learnjava.strings;

import java.util.Random;

import com.yzd.learnjava.util.Print;
/*
 * StringBuilder
 */
public class UsingStringBuilder {
	public static Random random = new Random(47);
	public String toString() {
		StringBuilder sb = new StringBuilder("[");
		//StringBuffer sb = new StringBuffer("[");
		for(int i = 0; i < 25; i++) {
			sb.append(random.nextInt(100));
			sb.append(", ");
		}
		
		sb.delete(sb.length() - 2, sb.length());
		sb.append("]");
		return sb.toString();
	}
	
	public static void main(String[] args) {
		UsingStringBuilder usingStringBuilder = new UsingStringBuilder();
		Print.print(usingStringBuilder);
	}
}
